import request from '@/utils/request'

// 获取今日统计数据
export function getTodayStatistics() {
  return request({
    url: '/api/statistics/getTodayStatistics',
    method: 'get'
  })
}

// 获取营收趋势数据
export function getRevenueTrend(type) {
  return request({
    url: '/api/statistics/getRevenueTrend',
    method: 'get',
    params: {
      type
    }
  })
}

// 获取月度营收趋势数据
export function getMonthlyRevenueTrend(type) {
  return request({
    url: '/api/statistics/getMonthlyRevenueTrend',
    method: 'get',
    params: {
      type
    }
  })
}

// 获取时段订单分布数据
export function getHourlyDistribution() {
  return request({
    url: '/api/statistics/hourly/distribution',
    method: 'get'
  })
}

// 获取时段营收分布数据
export function getHourlyRevenue() {
  return request({
    url: '/api/statistics/hourly/revenue',
    method: 'get'
  })
}
